﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="AlbumManager1.aspx.cs" Inherits="MyWeb.AlbumManager1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Contents" runat="Server">
    <%--Navigation--%>
    <h4>User-->Album</h4>
    <br />
    <%--Upload panel--%>
    <div class="art-content-layout-wrapper layout-item-0" id="uploadAlbum" runat="server">
        <div class="art-content-layout layout-item-1" style="text-align:center;">
            <h3>Upload your images</h3>
            <br />
            <p>Introductions: only 3 steps for upload images this so simple and easy...</p>
            <br />
            <asp:Label ID="imginfo" runat="server" Text=""></asp:Label>
            <br />
            <br />
            <p>Step 1 chose your album where you store images</p>
            <br />
            <asp:DropDownList ID="DropDownList1" runat="server"></asp:DropDownList><asp:Button ID="btncreateAB" runat="server" Text="CreateAlbum" OnClick="btncreateAB_Click" /><asp:TextBox ID="txtAlbumName" runat="server" Style="width: 200px;"></asp:TextBox><asp:Button ID="btnCreate" runat="server" Text="Create" OnClick="btnCreate_Click" />
            <br />
            <br />
            <p>Step 2 chose your images</p>
            <br />
            <asp:FileUpload ID="myFileUpload" runat="server" multiple="true" accept="jpg" />
            <br />
            <br />
            <p>Step 3 check again and click upload button</p>
            <br />
            <asp:Button ID="btnupload" runat="server" Text="Upload" OnClick="btnupload_Click" />
        </div>
    </div>
    <%--Show album panel--%>
    <div class="art-content-layout-wrapper layout-item-0" id="showAlbum" runat="server">
        <div class="art-content-layout layout-item-1">
            <h3>Your Gallery:</h3>
            <br />
            <p>Filter by Album:</p>
            <asp:DropDownList ID="DropDownList2" runat="server"></asp:DropDownList>
            <asp:Button ID="btnUploadImg" runat="server" Text="Upload Image" OnClick="btnUploadImg_Click" />

            <div style="margin-left:450px;margin-top:-100px;position:absolute;border:red solid;">
                <h4 style="color:red;font-size:14px;font-weight:bold;">Your Cart</h4>
                <asp:Label ID="choseinfo" runat="server" Text="Current chose:5 products"></asp:Label>
                <br />
                <asp:Label ID="costinfo" runat="server" Text="Total cost:2500$"></asp:Label>
                <br />
                <p style="text-align:right;margin-right:2px;"><a href="Cart1.aspx" style="color:red;font-weight:bold;font-size:12px;">View Cart</a></p>
                <br />
            </div>
            
            <br />
            <br />
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" AllowPaging="True" PageSize="2" AllowSorting="True"
                DataKeyNames="ImageID,AlbumName,ImgName,ImgPath" OnPageIndexChanging="GridView1_PageIndexChanging" OnRowCommand="GridView1_RowCommand">
                <Columns>
                    <asp:TemplateField HeaderText="Album">
                        <ItemTemplate>
                            <asp:Label ID="lblAlbumName" runat="server" Text='<%# Eval("AlbumName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Picture">
                        <ItemTemplate>
                            <asp:Label ID="lblImgName" runat="server" Text='<%# Eval("ImgName") %>'></asp:Label>
                            <br />
                            <img src="<%#Eval("ImgPath") %>" style="width:400px;"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Img-Size">
                        <ItemTemplate>
                            <asp:DropDownList ID="DropDownList3" runat="server" DataSource="<%#getSizes() %>"></asp:DropDownList>
                        </ItemTemplate>                        
                    </asp:TemplateField>
                    <asp:ButtonField ButtonType="Link" CommandName="add2cart" Text="Add to cart" HeaderText="Select" ControlStyle-ForeColor="White"/>
                </Columns>
                <EmptyDataTemplate>
                    &nbsp; There isn&#39;t any results
                </EmptyDataTemplate>
            </asp:GridView>
        </div>
    </div>
</asp:Content>


